package exception_exercise;

public class Student2 {
    private int age2;

    public int getAge2() {
        return age2;
    }

    public void setAge2(int age2) {
        if(age2<0 || age2>100){
            throw new RuntimeException();
        }
        this.age2 = age2;
    }
}
